<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<meta charset="utf-8">
<title>留言板</title>
<script type="text/javascript">
function checkform() {
	document.getElementById("titleID").value=document.getElementById("ly_biaoti").value;
	document.getElementById("neirongID").value=document.getElementById("ly_neirong").value;
	document.getElementById("fabu").submit();
	} 
</script>
<style>
#log {
	width: 960px;
	height: 90px;
}
#nav {
	width: 960px;
	height: 48px;
}
#nav .content_nav 
{
	width: 960px;
	height: 48px;
	margin: 0px 0px;
	background:#71BBBB;
}
#nav a {
	font-size: 19px;
	color:#6F0;
	font-family:"微软雅黑";
	font-weight:bold;
	display: inline-block;
	line-height: 48px;
	text-decoration: none;
}
a.other {
	padding: 0 23px;
}
a.other:hover 
{
	background:#999;
}
body{
	margin:auto;
	width:960px;
	bgcolor:#FFFFFF;
}
.gonggao{
	width: 258px;
	height: 699px;
	float:left;
	border-right:1px solid #6F0;
	border-bottom:1px solid #6F0;
	border-left:1px solid #6F0;
	background:#71CABF;
}
.neirong{
	width: 699px;
	height: 699px;
	float:right;
	border-bottom:1px solid #6F0;
	border-right:1px solid #6F0;
	background:#FFD;
}
.zhengwen{
	width: 960px;
	height: 700px;
}
.lylist{
	width:699px;
	height:620px;	
}
.page{
	width:699px;
	height:50px;
	margin:auto;	
}
</style>
</head>

<body>
<div id="log">
<img src="img/admin.gif"/>
</div>
<!--导航部分-->
<div id="nav">
<s:url id="getAction" value="getLiuyan"> 
     </s:url>
	<div class="content_nav" align="center">	
	<a href="admin.jsp" class="other">系统首页</a>
	<a href="fbzy.jsp" class="other">发布作业</a>
	<a href="cxzy.jsp" class="other">查询作业</a>
	<a href="rygl.jsp" class="other">人员管理</a>
	<s:a href="%{getAction}">留言板</s:a>
 	</div>
</div>
<!--导航结束-->
<div class="zhengwen" align="center">
<div class="gonggao">
  <table width="100%" border="0">
    <tr>
      <td style="color:#03F">欢迎您，【<s:property value="%{#session.login.userName}"/>】老师
      <br/>
      <a href="/zuoyeManage/login.jsp">[切换用户]</a>
      </td>
    </tr>
    <tr>
      <th>公告列表：</th>
    </tr>
    <tr>
      <td>公告内容</td>
    </tr>
  </table>
</div>
<div class="neirong">
<div class="lylist">
  <s:form action="addLiuyan" method="post" id="fabu">
       <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
       	 <tr>
           	<td width="20%">标题：</td>
            <td width="80%">
              <input type="text" id="ly_biaoti" value="25字内" maxlength="25">
            </td>
         </tr>
          <tr>
           	<td width="20%" align="left" valign="top">内容：</td>
            <td>
                <textarea cols="50px" rows="5" id="ly_neirong">200字内</textarea>
                
                <s:hidden name="title" id="titleID" value="" ></s:hidden>
				<s:hidden name="neirong" id="neirongID" value="" ></s:hidden>
            </td>
            <td align="left" valign="middle"><s:submit value="确定留言" onClick="checkform();"/></td>
         </tr>
	</table>
</s:form>
<!--以下是留言展示 -->
<center><font color="red" size="-1"><s:property value="log" /></font></center>
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">

		 <s:iterator value="liuyans" >
       	 <tr>
           	<td width="15%" align="left" valign="bottom" style="font-size:10px;color:#F00">第<s:property value="id"/>楼</td>
                <th width="85%" align="left" style="word-break:break-all; color:#000; background-color:#CCC; font-size:12px"><s:property value="title"/></th>         
         </tr>
         <tr>
            	<td width="15%" align="left" valign="top" style="font-size:10px;color:#F00">作者：<s:property value="userName"/></td>
                <td width="85%" style="word-break:break-all; color:#999; font-size:12px"><s:property value="neirong"/></td>  
         </tr> 
         <tr>
         <td height="20"></td>
         </tr>
         </s:iterator>
 </table>
 </div>
 <div class="page">
 <s:url id="url_pre" value="getLiuyan">  
         <s:param name="pageNow" value="pageNow-1"></s:param>  
     </s:url>  
  
     <s:url id="url_next" value="getLiuyan">  
         <s:param name="pageNow" value="pageNow+1"></s:param>  
     </s:url>    
  
     <s:a href="%{url_pre}">上一页</s:a>  
       
     <s:iterator value="liuyans" status="status">  
        <s:url id="url" value="getLiuyan">  
            <s:param name="pageNow" value="pageNow"/>  
        </s:url>  
     </s:iterator>  
  
     <s:a href="%{url_next}">下一页</s:a>

</div>
</div>
</div>
<div class="content_nav" align="center">	
	版权所有--托普学院--互联网一班</div>
</body>
</html>
